﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<#include "/pages/include/include.ftl" />
<@h.css href="/css/uc.css"/>
<@h.css href="/css/upload.css"/>
<@h.js src="/javascripts/public/myfile.js"/>
<#include "/pages/include/setlayout.ftl" />
<script type="text/javascript">
	var myfile=new myfile();
	$(function(){
			$('#choose').click(function(){
				myfile.chooseCate();
			});
			$('#uploadFile').click(function(){
				myfile.uploadAdminFile('${tempFileId?if_exists}');
			});
	});
	function submit(){
		var form=$('#saveform');
		var legal =form.validate();
		if(legal){
			form.submit();
		}
		return;
	}
	
	function loadAttach(){
		$('#attachContainer').load('${contextPath}/myfile/myfile-loadAdminTempAttach.action?tempFileId=${tempFileId?if_exists}');
	}
	
	function delAttach(id){
		$('#attachContainer').load('${contextPath}/myfile/myfile-delAdminTempAttach.action?tempFileId=${tempFileId?if_exists}&attachId='+id);
	}
	
	function loadImage(guid){
		$('#ic'+guid).load('${contextPath}/myfile/myfile-loadTempImage.action?tempFileId='+guid,function(){
			if($('#ic'+guid).html()!=""){
				$('#up'+guid).hide();
			}else{
				$('#up'+guid).show();
			}
		});
	}
	function delImage(id,guid){
		$('#ic'+guid).load('${contextPath}/myfile/myfile-delTempImage.action?tempFileId='+guid+'&attachId='+id,function(){
			if($('#ic'+guid).html()!=""){
				$('#up'+guid).hide();
			}else{
				$('#up'+guid).show();
			}
		});
		
	}
	
</script>
<style type="text/css">
.style1 {
	text-align: center;
	color: #E67201;
	font-size: x-large;
}
</style>
</head>

<body>
<#assign menuId="adminfile">
<div id="layout1" class="wrapper">
	<#include "/pages/person/myfile/file_menu.ftl" />
	<div position="center" title="上传文档" style="overflow:auto">
		<form id="saveform" action="${contextPath}/myfile/myfile-adminFileSave.action" method="post">
		<@s.hidden id="tempFileId" name="tempFileId" value="${tempFileId?if_exists}"/>
		<div id="step2" class="multi-upload">
			<p class="upload-tips" id="upload-tips">为了方便资料被更多用户浏览和下载，请耐心补充以下信息。<a id="uploadFile" class="minibutton" style="width:70px;"><span>添加文件</span></a></p>
			<div id="all-fill">
				<h3></h3>
				<div class="form-holder clearfix">
					<div id="attachContainer">

					</div>
				</div>
			</div>
		</div>
		</form>
	</div>
	<#include "/pages/include/top.ftl" />
	
	
	<#include "/pages/include/bottom.ftl" />
</div>

</body>

</html>
